<%--
  Created by IntelliJ IDEA.
  User: 星星在唱歌
  Date: 2022/2/25
  Time: 20:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>修改景点信息</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/bootstrap.css">
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/jquery-3.4.1.js"></script>
</head>
<body>
<div style="width: 800px; margin: 0 auto;text-align: center;" class="container">
    <h1>修改景点信息</h1>
    <form action="${pageContext.request.contextPath}/main?cmd=update" method="post" onsubmit="return check()"
          class="form-horizontal">
        <input type="hidden" value="${id}" name="id">
        <table class="table" style="margin: 0 auto;">
            <tr>
                <div class="form-group">
                    <td><label for="" class="col-sm-2 control-label">景点信息</label></td>
                    <td><textarea name="introduce" cols="50" rows="10" id="address"
                                  class="form-control">${one.introduce}</textarea></td>
                </div>
            </tr>
            <tr>
                <td><label for="" class="col-sm-2 control-label">发布时间</label></td>
                <td><input type="text" name="pubTime" value="${one.pubTime}" class="form-control"></td>
            </tr>
            <tr>
                <td><label for="" class="col-sm-2 control-label">票价</label></td>
                <td><input type="text" name="price" value="${one.price}" class="form-control"></td>
            </tr>
            <tr>
                <div class="form-group">
                    <td><label for="" class="col-sm-2 control-label">城市</label></td>
                    <td>
                        <select name="cityId" class="form-control">
                            <c:forEach items="${city}" var="c">
                                <option value="${c.cityId}"
                                        <c:if test="${one.cityId == c.cityId}">selected</c:if>> ${c.cityName} </option>
                            </c:forEach>
                        </select>
                    </td>
                </div>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">
                    <input type="submit" name="submit" value="修改信息" class="btn btn-info">
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>

